//
//  KLHelp.h
//  KISSLOCK
//
//  Created by 陈宾鹏 on 16/4/21.
//  Copyright © 2016年 陈宾鹏. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
#import "MBProgressHUD.h"

static UIView *coverView;

@interface KLHelp : NSObject

+ (void)initButtton:(UIButton *)button withTitle:(NSString *)title;

+ (void)setNavigationBarBgColor:(UIColor *)color controller:(UIViewController *)ctrl;

+ (void)showAlertViewforViewController:(UIViewController *)viewController text:(NSString *)text dismissedOperate:(void (^)(void))dismissedOperate;

+ (void)showTextHUDforViewController:(UIViewController *)viewController text:(NSString *)text dismissedOperate:(void (^)(void))dismissedOperate;

+ (void)showTextHUDforView:(UIView *)view text:(NSString *)text dismissedOperate:(void (^)(void))dismissedOperate;

+ (MBProgressHUD *)showHUDAddedTo:(UIView *)view title:(NSString *)title details:(NSString *)details animated:(BOOL)animated;
+ (MBProgressHUD *)showHUDAddedTo:(UIView *)view animated:(BOOL)animated;

+ (MBProgressHUD *)showTextHUDforView:(UIView *)view text:(NSString *)text;

+ (void)hideAllHUDsForView:(UIView *)view animated:(BOOL)animated;

// 判断密码中是否包含特殊字符
+ (BOOL)haveSpecialChar:(NSString *)text;

// 判断设备
+ (NSString*)deviceString;

// unicode文本长度
+ (NSUInteger)unicodeLengthOfString:(NSString *)text;

// 格式化时间戳(返回格式化的日期时间字符串,样式为时分秒 年月)
+ (NSString *)getTimeStringWithFormattor:(NSString *)formattor andTimeStamp:(NSTimeInterval)timeStamp;

//判断当前是否有网络
+ (BOOL)isConnectionAvailable;

+(BOOL)systemDateFormateIs12_or_24;

//将字符串转字典
+(NSDictionary *)dictionaryWithJsonString:(NSString *)jsonString;

//将字典转字符串
+(NSString*)dictionaryToJson:(NSDictionary *)dic;

+(UIColor *)mainBlueColor;

//设置导航栏
+(void)navSet:(UIViewController *)SELF doBackHandeler:(void (^)(UIButton *backButton))doBackHandler;

// 实名认证专用
/**设置导航条左边返回 右边下一步*/
+ (void)navSet:(UIViewController *)SELF doBackHandler:(void(^)(UIButton *backButton))doBackHandler nextStepHandler:(void(^)(UIButton *nextStepBtn)) nextStepHandler;
/**免密管理初始化导航条*/
+ (void)navSetMianMi:(UIViewController *)SEFL doBackHandler:(void(^)(UIButton *backBtn))doBackHandler saveHandler:(void(^)(UIButton *saveBtn))saveHandler;

//创建无数据时的图片
+(void)setNoDateImageWithView:(UIView *)view type:(NSInteger)type;

//移除无数据和无网时的图片
+(void)removeImgViewAndNoticeLabel;

//创建／取消黑色半透明蒙板
+(void)blackCoverViewShowAndHide:(UIView *)fatherView showOrHide:(BOOL)isShow;

//比较两个年月日日期的大小
+(int)compareDate:(NSString*)date01 withDate:(NSString*)date02;

//获取用户的AESKEY
+(NSString *)getUserSixTeenRandomAESKey;

//获取锁对应公钥
+(NSString *)getLockRSAPublicKeyWithLockName:(NSString *)lockName;

//手机号转用户id
+(NSString *)userIDToTwelveByteWithUserID:(NSString *)userID;

/**验证身份证号*/
+ (BOOL)isIdentityStringIegal:(NSString *)identityString;

/**判断是不是6位纯数字*/
+ (BOOL)isSixdigitNumberString:(NSString *)pwdString;

/**数组转json*/
+ (NSString *)jsonFromArray:(NSArray *)array;

@end
